{
double distance = gcdist(lat_orig, long_orig,
lat_orig_adj, long_orig_adj);
+ double frac;
+ double lat_dest;
+ double long_dest;
+ waypoint* wpt_dest = NULL;
distance = radtometers(distance);
if (distance <= maxDist) {
return NULL;
}
- double frac = maxDist / distance;
- double lat_dest;
- double long_dest;
+ frac = maxDist / distance;
linepart(lat_orig, long_orig, lat_orig_adj, long_orig_adj, frac,
&lat_dest, &long_dest);
- waypoint* wpt_dest = waypt_dupe(wpt_orig);
+ wpt_dest = waypt_dupe(wpt_orig);
wpt_dest->latitude = DEG(lat_dest);
wpt_dest->longitude = DEG(long_dest);
double lat_orig_next = RAD(wpt_orig_next->latitude);
double long_orig_next = RAD(wpt_orig_next->longitude);
+ waypoint* wpt_dest_next = NULL;
if (is_small_angle(lat_orig, long_orig, lat_orig_prev,
long_orig_prev, lat_orig_next, long_orig_next)) {
route_add_wpt(route_dest, wpt_dest_prev);
}
- waypoint* wpt_dest_next = create_wpt_dest(wpt_orig,
+ wpt_dest_next = create_wpt_dest(wpt_orig,
lat_orig, long_orig, lat_orig_next, long_orig_next);
if (wpt_dest_next != NULL) {
route_add_wpt(route_dest, wpt_dest_next);
#define cet_ucs4_ofs_ansi_x3_4_1968 128
#define cet_ucs4_cnt_ansi_x3_4_1968 1
-const int cet_ucs4_map_ansi_x3_4_1968[cet_ucs4_cnt_ansi_x3_4_1968] = {};
+const int cet_ucs4_map_ansi_x3_4_1968[cet_ucs4_cnt_ansi_x3_4_1968] = {0};
#define cet_ucs4_to_ansi_x3_4_1968_ct 1
-const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_4_1968_ct] = {};
+const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_4_1968_ct] = {0};
// #define cet_ucs4_to_ansi_x3_4_1968_extra_ct 200
#define cet_ucs4_ofs_ibm891 128
#define cet_ucs4_cnt_ibm891 1
-const int cet_ucs4_map_ibm891[cet_ucs4_cnt_ibm891] = {};
+const int cet_ucs4_map_ibm891[cet_ucs4_cnt_ibm891] = {0};
#define cet_ucs4_to_ibm891_ct 1
-const cet_ucs4_link_t cet_ucs4_to_ibm891_links[cet_ucs4_to_ibm891_ct] = {};
+const cet_ucs4_link_t cet_ucs4_to_ibm891_links[cet_ucs4_to_ibm891_ct] = {0};
/*
#define cet_ucs4_to_ibm891_extra_ct 0
-const cet_ucs4_link_t cet_ucs4_to_ibm891_extra[cet_ucs4_to_ibm891_extra_ct] = {};
+const cet_ucs4_link_t cet_ucs4_to_ibm891_extra[cet_ucs4_to_ibm891_extra_ct] = {0};
*/
cet_cs_vec_t cet_cs_vec_ibm891 = /* defined in cet.h */
#define cet_ucs4_ofs_ibm903 128
#define cet_ucs4_cnt_ibm903 1
-const int cet_ucs4_map_ibm903[cet_ucs4_cnt_ibm903] = {};
+const int cet_ucs4_map_ibm903[cet_ucs4_cnt_ibm903] = {0};
#define cet_ucs4_to_ibm903_ct 1
-const cet_ucs4_link_t cet_ucs4_to_ibm903_links[cet_ucs4_to_ibm903_ct] = {};
+const cet_ucs4_link_t cet_ucs4_to_ibm903_links[cet_ucs4_to_ibm903_ct] = {0};
/*
#define cet_ucs4_to_ibm903_extra_ct 0
-const cet_ucs4_link_t cet_ucs4_to_ibm903_extra[cet_ucs4_to_ibm903_extra_ct] = {};
+const cet_ucs4_link_t cet_ucs4_to_ibm903_extra[cet_ucs4_to_ibm903_extra_ct] = {0};
*/
cet_cs_vec_t cet_cs_vec_ibm903 = /* defined in cet.h */
#define cet_ucs4_ofs_iso_8859_1 256
#define cet_ucs4_cnt_iso_8859_1 1
-const int cet_ucs4_map_iso_8859_1[cet_ucs4_cnt_iso_8859_1] = {};
+const int cet_ucs4_map_iso_8859_1[cet_ucs4_cnt_iso_8859_1] = {0};
#define cet_ucs4_to_iso_8859_1_ct 1
-const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_ct] = {};
+const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_ct] = {0};
/*
#define cet_ucs4_to_iso_8859_1_extra_ct 0
static
void kml_gc_make_balloonstyletext(void)
{
-
+ const char** tp;
kml_write_xml(1, "<BalloonStyle><text><![CDATA[\n");
kml_write_xml(0, "<!DOCTYPE html>\n");
kml_gc_all_tabs_text();
kml_write_xml(0, "<h1>Extra Maps</h1>\n");
- const char** tp;
kml_write_xml(1, "<ul>\n");
// Fortunately, all the mappy map URLs take lat/longs in the URLs, so
// the substition is easy.
char* r = xstrdup("");
fs_xml* fs_gpx = (fs_xml*)fs_chain_find(wpt->fs, FS_GPX);
+ xml_tag* root = NULL;
+ xml_tag* curlog = NULL;
+ xml_tag* logpart = NULL;
+
if (!fs_gpx) {
return r;
}
- xml_tag* root = fs_gpx->tag;
- xml_tag* curlog = NULL;
- xml_tag* logpart = NULL;
+ root = fs_gpx->tag;
curlog = xml_findfirst(root, "groundspeak:log");
while (curlog) {
time_t logtime = 0;
char* p, *is;
char date_placed[100]; // Always long engough for a date.
+ const char* issues = "";
+ char* logs;
+
kml_write_xml(1, "<Placemark>\n");
kml_write_xml(1, "<name>\n");
// Highlight any issues with the cache, such as temp unavail
// or archived.
- const char* issues = "";
if (waypointp->gc_data->is_archived == status_true) {
issues = "<font color=\"red\">This cache has been archived.</font><br/>\n";
} else if (waypointp->gc_data->is_available == status_false) {
kml_write_xml(0, "<Data name=\"gc_icon\"><value>%s</value></Data>\n", is);
kml_write_xml(0, "<Data name=\"gc_short_desc\"><value><![CDATA[%s]]></value></Data>\n", waypointp->gc_data->desc_short.utfstring ? waypointp->gc_data->desc_short.utfstring : "");
kml_write_xml(0, "<Data name=\"gc_long_desc\"><value><![CDATA[%s]]></value></Data>\n", waypointp->gc_data->desc_long.utfstring ? waypointp->gc_data->desc_long.utfstring : "");
- char* logs = kml_geocache_get_logs(waypointp);
+ logs = kml_geocache_get_logs(waypointp);
kml_write_xml(0, "<Data name=\"gc_logs\"><value><![CDATA[%s]]></value></Data>\n", logs);
xfree(logs);
int ii, jj, ch, resbytes=0;
res = xmalloc(len*2 + 1); // bigger to allow for utf-8 expansion
for (ii=0; ii<len; ii++) {
- ch = gbfgetint16(fin);
char utf8buf[8];
int utf8len;
+ ch = gbfgetint16(fin);
// convert to utf-8, possibly multiple bytes
utf8len = cet_ucs4_to_utf8(utf8buf, sizeof(utf8buf), ch);
for (jj=0; jj < utf8len; jj++) {